   	<script type="text/javascript" src="../com.atilax.frmwk/jquery-1.11.3.js"></script>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<p><p>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<!--  loading -->
<link rel="stylesheet" href="dist/ladda-themeless.min.css">
<script src="dist/spin.min.js"></script>
<script src="dist/ladda.min.js"></script>   



<div class="panel   panel-default" style="width:95%;margin-left:10px">
  <div class="panel-heading">-----上传升级------------------</div>
  <div class="panel-body">
    
	
			  



<!-- body start -->


<div style="display:none">
路径与配置
<textarea rows="3" cols="200" id="cfgtextbox" style="width:100%">
 
 

 
</textarea>
</div>
  
	上传升级包：<input type = "file" name = "filex" onchange="upload()" id="filex"  style="display:inline" class="btn btn-default"/>      &nbsp;  &nbsp;  &nbsp;<img id="loadimg" src="..\com.attilax\loading\loading-0.gif"> 服务器保存路径：<input type = "text" name = "cmdtextbox" id="cmdtextbox"  style="width:500px;display:inline"/>  
  <button   type="button" class="btn btn-success" onclick="btn_click()" >
 提交执行更新  
  </button>
  <img id="loadimg_exe" src="..\com.attilax\loading\loading_bar.gif" style="display:none"> 



<script>
  $("#loadimg").hide();
function upload()
{
 
  $("#cmdtextbox").val("上传中");
  $("#loadimg").show();
	var self=this;
 
	var fd = new FormData();
	fd.append("serverSavePath", "/tmp");
	fd.append("upfile", $("#filex").get(0).files[0]);
	$.ajax({
		url: "../UploadServlet1",
		type: "POST",
		processData: false,
		contentType: false,
		data: fd,
		success: function(d) {
			console.log(d);
			console.log("----fini");
		    $("#cmdtextbox").val(d);
			  $("#loadimg").hide();
		}
	});	
 

}

 


function btn_click()
{
$("#loadimg_exe").show();
$("#editctrl").val("");	
//alert("");
url="../autoupSrv?cmdtextbox=@cmdtextbox@&mode=&cwd="+$("#cwd").val()+"&cfgtextbox=@cfgtextbox@&cmdFrom=file";
url=url.replace("@cmdtextbox@",$("#cmdtextbox").val());
url=url.replace("@cfgtextbox@", encodeURIComponent($("#cfgtextbox").val()));
$.get(url, function(result,status,xhr){
	 
		$("#editctrl").val(result);		 
				$("#loadimg_exe").hide();		 
	 });
    
}
	
	
	</script>


<textarea rows="50" cols="200" id="editctrl" style="width:100%">
 
运行结果。。。。

 
</textarea>
<!-- end -->


  </div>
</div>